package com.whfc.common.enums;

/**
 * 系统模块
 *
 * @author : qzexing
 * @version : 1.0
 * @date : 2020-08-19 17:27
 */
public enum SysModule {

    MACH(1, "设备"),

    EMP(2, "人员"),

    MAM(3, "物资"),

    ENV(4, "环境"),

    FIM(5, "智能监控"),

    FSE(6, "特种设备"),

    CAR(7, "车辆"),

    QUALITY(8, "质量"),

    SAFETY(9, "安全"),

    OTHER(100, "其它");

    private final Integer value;

    private final String desc;

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    SysModule(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private static SysModule parseValue(Integer value) {
        switch (value) {
            case 1:
                return MACH;
            case 2:
                return EMP;
            case 3:
                return MAM;
            case 4:
                return ENV;
            case 5:
                return FIM;
            case 6:
                return FSE;
            case 7:
                return CAR;
            case 8:
                return QUALITY;
            case 9:
                return SAFETY;
            default:
                return OTHER;
        }
    }

}
